package com.ipc.cart.demo;

import java.io.IOException;

import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import javax.portlet.PortletException;
import javax.portlet.PortletSession;

import com.liferay.portal.kernel.util.ParamUtil;
import com.liferay.util.bridges.mvc.MVCPortlet;

public class AddToCart extends MVCPortlet {

		
	public void addToCart(ActionRequest actionRequest,
			ActionResponse actionResponse) throws IOException, PortletException {
		String id1 = ParamUtil.getString(actionRequest, "fullname");
		/**
		 * Communication between two using Portlet Session 
		 */
		/*PortletSession session = actionRequest.getPortletSession();
		session.setAttribute("fullNameValue", fullNameValue, PortletSession.APPLICATION_SCOPE);*/
		
		/**
		 * IPC
		 */
		actionResponse.setRenderParameter("id1", id1);
		
		
		System.out.println("id1 : "+id1);
	}
}
